package cn.suzhang.designpatterns.simplefactory;

public class SimpleFactory {

    public static Product create(String oper) {
        switch (oper) {

        case "A":
            return new ProductA();

        case "B":
            return new ProductB();
        }
        return null;
    }

}
